﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Zhaoxi.MSACommerce.CategoryService.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class init02 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.RenameColumn(
                name: "ParentId",
                table: "tb_category",
                newName: "parent_id");

            migrationBuilder.AlterColumn<long>(
                name: "parent_id",
                table: "tb_category",
                type: "bigint(20)",
                nullable: false,
                comment: "父节点ID",
                oldClrType: typeof(long),
                oldType: "bigint");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.RenameColumn(
                name: "parent_id",
                table: "tb_category",
                newName: "ParentId");

            migrationBuilder.AlterColumn<long>(
                name: "ParentId",
                table: "tb_category",
                type: "bigint",
                nullable: false,
                oldClrType: typeof(long),
                oldType: "bigint(20)",
                oldComment: "父节点ID");
        }
    }
}
